import { SET_STORE_STATE, SET_LOCAL_STATE,SET_USER_LOCAL_LABEL } from './actionType';
import { Commit } from 'vuex';

declare interface ICtx {
	commit: Commit;
	state: IStoreState;
}



export default {
	[SET_STORE_STATE]<T>({ commit }: ICtx, options: ISetStoreStateOptions<T>): void {
		commit(SET_STORE_STATE, options);
	},
	[SET_LOCAL_STATE]<T>({ commit }: ICtx, options: ISetStoreStateOptions<T>): void {
		commit(SET_LOCAL_STATE, options);
	},
	[SET_USER_LOCAL_LABEL]({ commit }: ICtx,payload:number):void{
		commit(SET_USER_LOCAL_LABEL,payload);
	}
}